<template>
  <div>
    <g-dynamic-table
      type="tenants"
      ref="table"
      :fetch="fetchDataList"
      @action-click="handleActionClick"
      :showExport="true"
    >
      <template #headerCell="{ column }">
        <template v-if="column.field == 'No'">
          {{ column.title }}
        </template>
      </template>
      <template #bodyCell="{ column, record }">
        <!-- 是否已激活 -->
        <template v-if="column.key === 'isActive'">
          <a class="isActive">
            <CheckCircleTwoTone v-if="record.isActive" twoToneColor="#50CD89" />
            <CloseCircleTwoTone v-if="!record.isActive" twoToneColor="#F2416C" />
          </a>
        </template>
      </template> </g-dynamic-table
  ></div>
</template>

<script lang="ts">
  import { defineComponent } from 'vue';
  import GDynamicTable from '/@/shared/components/g-dynamic-table/index.vue';

  import Tenants from './tenants';

  export default defineComponent({
    name: 'tenants-news',
    components: {
      GDynamicTable,
    },
    mixins: [Tenants],
  });
</script>

<style scoped lang="less"></style>
